/*
 * gameDevice.h
 *
 *  Created on: 24.02.2012
 *      Author: Caffeine
 */

#ifndef CGAMEDEVICE_H_
#define CGAMEDEVICE_H_
#include "EventReceiver.h"
#include "IGameObject.h"
#include <irrlicht.h>
class CGameDevice {
private:
	irr::IrrlichtDevice*device;
	irr::scene::ISceneManager*smgr;

#ifdef __GAME__
	irr::video::IVideoDriver* driver;
	irr::gui::IGUIEnvironment* guienv;
	EventReceiver*receiver;
	irr::core::dimension2d<irr::u32> screenDim;
	irr::u32 DeltaTime;
	bool runing;
#endif
	IGameObject*gameObject;


public:
	void init();
#ifdef __GAME__
	irr::core::dimension2d<irr::u32> getScreenDim();
#endif
	CGameDevice();
	virtual ~CGameDevice();
	void setGameObject(IGameObject*c);
	IGameObject*getGameObject();

	bool isRuning();
	irr::IrrlichtDevice*getDevice();
	//irr::scene::ISceneManager*getSmgr();
	static const char*GetCompilerName();
#ifdef __GAME__
	void run();
	//irr::video::IVideoDriver*getDriver();
	EventReceiver*getReceiver();
	//irr::gui::IGUIEnvironment*getGuiEnv();

	irr::f32 getDeltaTime();
	irr::u32 getDeltaTimeS();
#endif

};

#endif /* GAMEDEVICE_H_ */
